package leetCode;

import java.util.ArrayDeque;
import java.util.Deque;

public class Q232 {
    class MyQueue {
        public Deque<Integer> deque = new ArrayDeque<>();
        public MyQueue() {

        }

        public void push(int x) {
            this.deque.add(x);
        }

        public int pop() {
            return this.deque.pop();
        }

        public int peek() {
            return this.deque.getFirst();
        }

        public boolean empty() {
            return this.deque.isEmpty();
        }
    }
}
